/**
 * Created by Mikey on 2017/9/18.
 */
import * as api from '../api'

export default {
  state : {
    contentData : []
  },
  mutations : {
    loadContentData : function (state,data) {
      state.contentData = data;
    }
  },
  actions : {
    getContentData : function ({commit},url) {
      api.Ajax(url,'GET',null,'.main-page')
      .then(data =>{
        commit('loadContentData',data)
      })
    }
  }
}
